package lesson7;

public class Task3 {

		public static void main(String[] args) 
		{
			int n = 4;
			for(int i = 1; i <= n; i++)
			{
				printRow(i);
			}
			
			for(int i = n-1; i >=1; i--)
			{
				printRow(i);
			}
		}
		
		public static void printRow(int i)
		{
			for(int j = 1; j <= i; j++)
			{
				System.out.print(j + " ");
			}
			System.out.println();
		}
}
